pub fn new_birthday_probability(n: u32) -> f64 {
    // 假设一年有365天
    const DAYS_IN_YEAR: u32 = 365;

    // 计算所有人生日都不相同的概率
    let mut probability = 1.0;
    for i in 2..=n {
        probability *= (DAYS_IN_YEAR - i + 1) as f64 / DAYS_IN_YEAR as f64;
    }

    // 计算至少有两人生日相同的概率
    1.0 - probability
}
